<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Bulletin extends CI_Controller {
    public function __construct() {
        parent::__construct();
        $this->load->helper('url');
        $this->load->library('session');
    }
    public function index() {
        if($this->session->userdata('barangay_id') == '' || $this->session->userdata('barangay_id') == null) {
            $this->load->view('index_main');
        } else {
            $this->load->view('index_main');
        }
    }
    public function weeklybulletin() {
        $this->load->model('Bulletin_model');
        $result['bulletin'] = $this->Bulletin_model->weeklyBulletin();
        print json_encode($result);
    }
}